// 项目 API 统一管理
import requests from "./request";
import mockRequests from "./mockRequest";

/**
 * 获取首页菜单数据
 */
export const getBaseCategoryList = function () {
    return requests({
        url: "product/getBaseCategoryList",
        method: "get"
    });
};

/**
 * 获取首页轮播图数据
 */
export const getHomeBannerList = function () {
    return mockRequests({
        url: "/banner",
        method: "get"
    });
};

/**
 * 获取floor数据
 */
export const getFloorList = function() {
    return mockRequests({
        url: "/floor",
        method: "get"
    });
};

/**
 * 获取搜索数据
 * url: api/list
 * method: post
 */
export const getSearchList = function(params) {
    return requests({
        url: "/list",
        method: "post",
        data: params || {}
    });
};